package com.ihr360.cnb.module.oneclick.service.fallback;


import com.ihr360.cnb.module.oneclick.service.OneClickService;
import com.ihr360.commons.entity.AuthUserInfo;
import com.ihr360.commons.vo.ResultInfo;
import com.ihr360.oneclick.entity.Spreadsheet;
import com.ihr360.oneclick.entity.StaffRecord;
import com.ihr360.oneclick.modal.ExcelImportContext;
import com.ihr360.oneclick.request.SaveExcelDataRequest;
import com.ihr360.oneclick.request.SpreadsheetImportRequest;
import com.ihr360.oneclick.vo.StaffMonthMessageVo;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.ArrayList;
import java.util.List;

@Component
public class OneClickServiceFallback implements OneClickService {


    @Override
    public ResultInfo<ExcelImportContext> excelDataParse(@RequestBody SpreadsheetImportRequest spreadsheetImportRequest) {
        return new ResultInfo.Builder<ExcelImportContext>().error("Excel解析服务异常!");
    }


    @Override
    public ResultInfo<List<StaffRecord>> getExcelImportStaffList(@RequestBody Spreadsheet spreadsheet){
        return new ResultInfo.Builder<List<StaffRecord>>().error("Excel解析服务异常!");
    }

    @Override
    public ResultInfo<Spreadsheet> saveExcelData(@RequestBody SaveExcelDataRequest saveExcelDataRequest) {
        return new ResultInfo.Builder<Spreadsheet>().error("Excel解析服务异常!");
    }

    /*@Override
    public ResultInfo<Spreadsheet> saveExcelData(@RequestBody ExcelImportContext excelImportContext) {
        return new ResultInfo.Builder<Spreadsheet>().error("Excel数据保存服务异常!");
    }*/

    @Override
    public List<String> getFunctionDataMonthList(@RequestParam(value = "functionId") String functionId,
                                                         @RequestBody AuthUserInfo authUserInfo){
        return new ArrayList<>();
    }

    @Override
    public StaffMonthMessageVo getFunctionStaffDataByMonth(@RequestParam(value = "functionId") String functionId,
                                                           @RequestParam(value = "groupId") String groupId,
                                                           @RequestBody AuthUserInfo authUserInfo){
        return new StaffMonthMessageVo();
    }

    @Override
    public StaffRecord getStaffRecord(@RequestBody AuthUserInfo authUserInfo){
        return null;
    }

    @Override
    public void checkLastName(String functionId, AuthUserInfo authUserInfo){ }
}